<?php

$author = new Author();

if ($author->load_by_slug($definition[0],true)) {

	function the_title() {
		global $author;
		echo utf8_encode($author->title);
	}
	function the_content() {
		global $author;
		echo utf8_encode($author->get_content());
	}
		
	function the_author_json() {
		global $author;
?>
			idAuthor: '<?php echo $author->get_id(); ?>',
			title: '<?php echo utf8_encode($author->get_title()); ?>',
			slug: '<?php echo $author->slug; ?>',
			content: '<?php echo utf8_encode($author->get_content()); ?>',
			idParent: '<?php echo $author->id_parent; ?>',
			creationTime: '<?php echo $author->creation_time; ?>',
			type: '<?php echo $author->type; ?>'
<?php
	}
	
} else {

	function the_title() {
		global $site;
		echo $site->lang("Not Found");
	}
	function the_content() {
		global $author;
		echo $author->_errmsg;
	}
		
	$cur_section = "404";
	
}

?>